<?php

namespace Modules\Admin\Http\Controllers;

use HiCommon\Service\ShopService;
use Illuminate\Support\Facades\Request;
class FinanceController extends BaseController
{
    /*财务统计*/
    public function finance_index(){
        try {
            $arr_search = Request::input();
            $arr_option = [
              'display'=>'only',
              'model'=>'admin',
            ];

            $result = ShopService::api_shop_finance_index($arr_search,$arr_option);
            $result['arr_search'] = $arr_search;
            if($result['state'] != 0){
                msg_error($result['msg']);
                return $result['msg'];
            }
            else{
                return view('admin::finance.finance_index',$result);
            }
        }
        catch (\Exception $exception) {
            msg_error($exception->getMessage());
            return '失败';
        }

    }

}
